[MOE] Special path for moe ptpc fp8, batch 1~32 with hsaco#3103
Open
sammysun0711 wants to merge 11 commits into
Open
[MOE] Special path for moe ptpc fp8, batch 1~32 with hsaco#3103sammysun0711 wants to merge 11 commits into
sammysun0711 wants to merge 11 commits into
Conversation
Signed-off-by: Xiake Sun <xiake.sun@amd.com>
…s, replace with torch.randperm to generate combination without repetition Signed-off-by: Xiake Sun <xiake.sun@amd.com>
Signed-off-by: Xiake Sun <xiake.sun@amd.com>
Signed-off-by: Xiake Sun <xiake.sun@amd.com>
Signed-off-by: Xiake Sun <xiake.sun@amd.com>
Signed-off-by: Xiake Sun <xiake.sun@amd.com>
1 task
sammysun0711
commented
May 9, 2026
…ebug print Signed-off-by: Xiake Sun <xiake.sun@amd.com>
Signed-off-by: Xiake Sun <xiake.sun@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Based on #2961
Integrate Qwen3.5 397B FP8 PTPC MOE in decoding phase for batch size 1-32 with FP8 weight decompression via hsaco.
Technical Details
Major optimization:
moe_gemm_batch1can directly usetopk_idsandtopk_weightand there is no dependency on moe_sortingmoe_gemm_batch+ stage 2:moe_2stage_splitkmoe_gemm_batch+ stage 2:moe_2stage_down_loopnThe function is disabled by default, should use
AITER_MOE_SMALL_BATCH=1to enable.The corresponding source file for .co is moe.py.
Test Plan
Test Result
Test results on MI308X (non-PTL)
AITER_MOE_SMALL_BATCH=1for batch size 1/2/4/8/10/12/16/32AITER_MOE_SMALL_BATCH=0for batch size 1/2/4/8/10/12/16/32Submission Checklist